*, :before, :after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-size: 16px;
    transition: all .5s ease-out;
    font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";
    tab-size: 4;
    --theme-color: #18a058;
    --theme-hover-color: #36ad6a;
    --shadow-color: #0000002b;
    --placeholder-color: #c2c2c2;
    --msg-bg-color: #f4f6f8;
    --owner-msg-bg-color: #d2f9d1;
    --base-shadow: 0 0 6px -1px var(--shadow-color);
    --base-radius: .375rem;
    --base-border: 1px solid var(--shadow-color);
    --hover-border: 1px solid var(--theme-color);
    --focus-border: 1px solid var(--theme-color);
    --focus-shadow: 0 0 6px -1px var(--theme-color);
}

/* 轮动条样式 */
* {
    scrollbar-width: thin; /* Firefox */
}
*::-webkit-scrollbar {
    /* 滚动条的宽 */
    width: 5px;
}
*::-webkit-scrollbar-thumb {
    /* 滚动条的背景色，圆角 */
    background-color: var(--theme-color);
    border-radius: 10px;
}
*::-webkit-scrollbar-track {
    /* 滚动槽的背景色，圆角 */
    background-color: #f5f5f5;
    border-radius: 10px;
}
*::-webkit-scrollbar-button {
    /* 滚动条的上下按钮的高宽 */
    width: 0;
    height: 0;
}
*::-webkit-scrollbar-corner {
    /* 滚动条的右下角的背景色 */
    background-color: #f5f5f5;
}

svg {
    display: block;
    vertical-align: middle;
}

/* 禁用样式 */
[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

#app {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
}

chat-views {
    display: block;
    overflow: auto;
    width: 100%;
    height: 100%;
    box-shadow: var(--base-shadow);
    border-radius: var(--base-radius);
}

chat-msg-views {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: hidden;
}

chat-msg-header {
    display: block;
    width: 100%;
    flex-shrink: 0; /* 避免被其他元素挤压空间 */
    overflow: hidden;
    padding: .5rem .5rem;
}

chat-msg-header * {
    height: 100%;
}

chat-msg-body {
    display: block;
    width: 100%;
    flex-grow: 1;
    overflow: auto;
}

chat-msg-footer {
    display: flex;
    width: 100%;
    padding: 1rem;
}

textarea-pre {
    position: relative;
    display: inline-block;
    flex-grow: 1;
    margin: 0 .5rem;
}

input-association {
    display: none;
    visibility: hidden;
    overflow: hidden;
    position: absolute;
    left: 0;
    bottom: 110%;
    padding: 0.5rem 1rem;
    width: 100%;
    border-radius: var(--base-radius);
    border: var(--base-border);
    background-color: white;
}

input-association, input-association * {
    transition: 0s;
}

chat-views[input-association] input-association {
    display: inline-block;
}

input-association[show] {
    visibility: visible;
}

input-association > div {}

textarea-hind, textarea {
    display: inline-block;
    resize: none;
    padding: 0.5rem 1rem;
    /* text-align: start; */
    /* vertical-align: bottom; */
    /* overflow-wrap: break-word; */
    /* word-wrap: break-word; */
    word-break: break-word;
    white-space: pre-wrap;
    /* white-space-collapse: preserve; */
    border-radius: var(--base-radius);
    border: var(--base-border);
    caret-color: var(--theme-color);
    width: 100%;
    height: 100%;
    opacity: 0;
    max-height: 10rem;
    overflow: auto;
}

textarea {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
}

textarea:hover {
    border: var(--hover-border);
}

textarea:focus {
    outline: none;
    border: var(--focus-border);
    box-shadow: var(--focus-shadow);
}

textarea::-webkit-input-placeholder {
    color: var(--placeholder-color);
}

button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-content: center;
    flex-wrap: nowrap;
    outline: none;
    padding: .5rem 1rem;
    border: var(--base-border);
    background-color: var(--theme-color);
    color: white;
    white-space: nowrap;
    border-radius: var(--base-radius);
}

button:hover {
    background-color: var(--theme-hover-color);
}

msg-intent {
    display: flex;
    padding: 1rem;
}

msg-intent[owner] {
    flex-direction: row-reverse;
}

msg-intent-icon {
    display: inline-block;
    padding: 0 .5rem;
    vertical-align: top;
}

msg-intent-icon * {
    width: 2rem;
    height: fit-content;
}

msg-intent-content {
    display: inline-block;
}

msg-intent-content-time {
    display: block;
    font-size: .75rem;
    color: var(--shadow-color);
    padding: 0 0 .5rem 0;
}

msg-intent[owner] msg-intent-content-time {
    text-align: end;
}

msg-intent-content-text {
    display: flex;
    word-break: break-word;
    white-space: pre-wrap;
}

msg-intent[owner] msg-intent-content-text {
    flex-direction: row-reverse;
}

msg-intent-content-text-html {
    display: block;
    padding: .5rem;
    min-height: 1rem;
    border-radius: var(--base-radius);
    background-color: var(--msg-bg-color);
}

msg-intent[owner] msg-intent-content-text-html {
    background-color: var(--owner-msg-bg-color);
}

pop-up {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #c2c2c261;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

pop-up-body {
    min-width: 25rem;
    min-height: 10rem;
    padding: 1rem .5rem;
    box-shadow: var(--base-shadow);
    border-radius: var(--base-radius);
    background-color: white;
}

tip {
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    margin: 1rem;
    padding: .5rem 1rem;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    background-color: white;
    box-shadow: var(--base-shadow);
    border-radius: var(--base-radius);
}

upload {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 5rem;
}

filelist-item {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    align-content: flex-start;
    align-items: center;
    flex-direction: row;
    margin: 0 0 1rem 0;
}

confirm-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

confirm-box-header {
    display: flex;
    flex-shrink: 0;
    border-bottom: var(--base-border);
}

confirm-box-body {
    display: flex;
    flex-shrink: 0;
    flex-grow: 1;
    padding: 1rem;
}

confirm-box-footer {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
}